package domain;

import utils.DateUtils;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 *
 * @author Freedy
 * @date 2020-12-26
 */
public class Syslog implements Serializable {

	private static final long serialVersionUID = 4536037369753928580L;
	private Integer id;

	private Date visitTime;
	private String visitTimeStr;

	private String username;

	private String ip;

	private String url;

	private Long executionTime;

	private String method;


  public String getVisitTimeStr() throws Exception {
    if (visitTime!=null){
      visitTimeStr = DateUtils.date2string(visitTime,"yyyy-MM-dd HH:mm:ss");
    }
    return visitTimeStr;
  }

  public void setVisitTimeStr(String visitTimeStr) {
    this.visitTimeStr = visitTimeStr;
  }

  public static long getSerialVersionUID() {
    return serialVersionUID;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }


  public Date getVisitTime() {
    return visitTime;
  }

  public void setVisitTime(Date visitTime) {
    this.visitTime = visitTime;
  }


  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }


  public String getIp() {
    return ip;
  }

  public void setIp(String ip) {
    this.ip = ip;
  }


  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }


  public Long getExecutionTime() {
    return executionTime;
  }

  public void setExecutionTime(Long executionTime) {
    this.executionTime = executionTime;
  }


  public String getMethod() {
    return method;
  }

  public void setMethod(String method) {
    this.method = method;
  }

}
